<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="hello">hello</div>
    <a name="link">链接</a >
    <p>title</p >
    <p class="tom">tom</p >
</body>

<script>
    var div_box = document.getElementById("hello")
    console.log(div_box)
    var a_box = document.getElementsByName("link")
    console.log(a_box[0])
    var p_pox = document.getElementsByTagName("link")
    console.log(div_box[0],p_pox[1])
    var clas_box = document.getElementsByClassName("link")
    console.log(clas_box[0])
</script>
</html>